<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<script type="text/javascript" src="<?php echo base_url() ?>public/tiny_mce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>public/phpDocx/classes/createDocx.inc"></script>

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<title>Generar Documento Compania</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>

<style>
	#descargar{
	
		 cursor:pointer;
	}
</style>

<script type="text/javascript">

$(document).ready(function(){
	
	 $("#descargar").click(function(){
		 
		    idCompania    = $("#idcompania").val();
		    idDocumento   = $("#iddocumento").val();

			var array = idCompania+'-'+idDocumento;
	     	window.location = "<?php echo site_url().'/companiadocumentos/descargarWord/'?>"+array;
		 
	 });
	 
});

</script>

<script type="text/javascript">
tinyMCE.init({

	
				mode : "textareas",
			    theme : "advanced",
			    plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,nonbreaking,xhtmlxtras,template",

				
			     // Theme options
			     theme_advanced_buttons1 : "save, print,|,bold,italic,underline,strikethrough,|,styleprops,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
			     theme_advanced_buttons2 : "search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
			     theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,ltr,rtl,|,fullscreen",
			     theme_advanced_toolbar_location : "top",
			     theme_advanced_toolbar_align : "left",
			     theme_advanced_statusbar_location : "bottom",
			     theme_advanced_resizing : false,
			     theme_advanced_source_editor_wrap : true,  

		        setup : function(ed) {
		            ed.onInit.add(function() {
		               tinyMCE.activeEditor.execCommand('mceToggleVisualAid');
		        });

		  }
		  
 });
	
</script>

</head>
<body>
<div id="titulo">Estatutos Sociales</div>
<form method="post" action="">
          <div align = "center">
          <div><b>Si desea descargar este documento:</b> <span id = "descargar" style = "font-size: 14px; color: #FE2E2E;">Click aqui!</span></div>
                <textarea style = "width:812px; height:792px;" name="contenido"  id = "contenido">

                		<div style="width: 612px; height: 792px; margin-left: 1.5cm;"><?php echo html_entity_decode($contenido);?></div>
                		
                </textarea>
		  </div>
		  
		  <input type = "hidden" id = "contenidoDocumento" name = "contenidoDocumento" value = ""></input>
		  
		  <input type = "hidden" id = "idcompania" name = "idcompania" value = "<?php echo $idCompania;?>"/>
		  <input type = "hidden" id = "iddocumento" name = "iddocumento" value = "<?php echo $idDocumento;?>"/>
	  </form>
	</body>
</html>